Skip to content

ATXP-266: Walk users through creating .env file when running atxp create#10

Merged
robdimarco-atxp merged 1 commit intomainfrom
robdimarco/atxp-266-walk-users-through-env-file-creation
Sep 10, 2025
Merged

ATXP-266: Walk users through creating .env file when running atxp create#10
robdimarco-atxp merged 1 commit intomainfrom
robdimarco/atxp-266-walk-users-through-env-file-creation

Conversation

@robdimarco-atxp
Copy link
Contributor

@robdimarco-atxp robdimarco-atxp commented Sep 10, 2025

Summary

  • Implements interactive environment variable configuration during project creation
  • Parses comments from env.example files to provide helpful descriptions for each variable
  • Detects placeholder values that need user configuration (empty, your_, TODO, etc.)
  • Guides users through configuring each variable with clear prompts and descriptions
  • Allows users to skip configuration or explicitly set variables to empty strings
  • Only shows environment reminders when .env files actually exist

Key Features

  • Dynamic comment parsing: Reads variable descriptions directly from template env.example comments
  • Smart placeholder detection: Automatically identifies variables that need configuration
  • Interactive prompts: User-friendly configuration flow with helpful descriptions
  • Flexible input handling: Support for skipping variables or setting empty values
  • Clean UX: No unnecessary warnings when templates don't have env files

Test Coverage

  • Comprehensive unit tests for parseEnvFile function (31 tests total)
  • Tests cover various env.example formats, edge cases, and real-world scenarios
  • Validates comment parsing, placeholder detection, and error handling

Test Plan

  • Build and typecheck pass
  • All existing tests continue to pass
  • New unit tests for parseEnvFile function pass
  • Linting passes
  • Manual testing with express template that has env.example
  • Manual testing with template that has no env.example

🤖 Generated with Claude Code

- Add interactive environment variable configuration during project creation
- Parse comments from env.example to use as variable descriptions
- Detect placeholder values (empty, your_, TODO, etc.) that need configuration
- Prompt users to configure each placeholder variable with helpful descriptions
- Allow users to skip configuration or set variables to empty strings
- Only show env reminders when .env file actually exists
- Add comprehensive unit tests for parseEnvFile function covering various formats and edge cases

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@robdimarco-atxp robdimarco-atxp merged commit d52158d into main Sep 10, 2025
1 check passed
@robdimarco-atxp robdimarco-atxp deleted the robdimarco/atxp-266-walk-users-through-env-file-creation branch September 10, 2025 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant